package com.anda.logistics.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.anda.logistics.dao.FreightDeliverDao;
import com.anda.logistics.model.FreightDeliver;
import com.anda.logistics.model.TruckInfo;
import com.anda.logistics.service.FreightDeliverService;
import com.anda.logistics.vo.JsonReturnVo;

@Component
public class FreightDeliverServiceImpl implements FreightDeliverService{
	private FreightDeliverDao freightDeliverDao;

	public FreightDeliverDao getFreightDeliverDao() {
		return freightDeliverDao;
	}
	@Resource
	public void setFreightDeliverDao(FreightDeliverDao freightDeliverDao) {
		this.freightDeliverDao = freightDeliverDao;
	}
	
	@Override
	public void save(FreightDeliver freightDeliver){
		this.freightDeliverDao.save(freightDeliver);
	}
	@Override
	public FreightDeliver getOnRoadOneByTruckId(long truckId) {
		return freightDeliverDao.getOnRoadOneByTruckId(truckId);
	}
	@Override
	public FreightDeliver getOnRoadOneByFreightId(long freightId) {
		return freightDeliverDao.getOnRoadOneByFreightId(freightId);
	}
	
}
